package com.ysd.lis.controller.sta;


import com.ysd.common.Result;
import com.ysd.lis.controller.pub.BaseController;
import com.ysd.lis.dto.sta.StaMenuDto;
import com.ysd.lis.dto.sta.StaMenuParam;
import com.ysd.lis.entity.sta.StaMenu;
import com.ysd.lis.service.sta.StaMenuService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * cold_chain.sys_module 前端控制器
 * </p>
 *
 * @author prs
 * @since 2024-12-18
 */
@Api(tags = "标准功能")
@RestController
@RequestMapping("/lis/sta/staMenu")
public class StaMenuController extends BaseController {

    @Autowired
    StaMenuService staMenuService;

    @ApiOperation("不分页查询")
    @GetMapping("/findStaMenuList")
    public Result findStaMenuList(StaMenuParam param){
        return staMenuService.findStaMenuList(param);
    }

    @ApiOperation("不分页查询")
    @GetMapping("/findStaMenuPageList")
    public Result findStaMenuPageList(StaMenuParam param){
        return staMenuService.findStaMenuPageList(param);
    }

    @ApiOperation("新增")
    @PostMapping("/addStaMenu")
    public Result addStaMenu(@RequestBody StaMenu staMenu){
        return  staMenuService.addStaMenu(staMenu);
    }

    @ApiOperation("修改")
    @PostMapping("/editStaMenu")
    public Result editStaMenu(@RequestBody StaMenu supplier) {
        return staMenuService.editStaMenu(supplier);
    }

    @ApiOperation("批量删除")
    @PostMapping("/batchDeleteStaMenuList")
    public Result batchDeleteStaMenuList(@RequestBody StaMenuDto dto){
        return  staMenuService.batchDeleteStaMenuList(dto);
    }

    @ApiOperation("不分页查询")
    @GetMapping("/sysStaMenu")
    public Result sysStaMenu(StaMenuParam param){
        return staMenuService.sysStaMenu(param);
    }

}
